package io.renren.modules.service.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.renren.common.utils.PageUtils;
import io.renren.common.utils.Query;
import io.renren.modules.service.dao.ProductNameDao;
import io.renren.modules.service.entity.ProductNameEntity;
import io.renren.modules.service.service.ProductNameService;
import org.springframework.stereotype.Service;

import java.util.Map;


@Service("productNameService")
public class ProductNameServiceImpl extends ServiceImpl<ProductNameDao, ProductNameEntity> implements ProductNameService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<ProductNameEntity> page = this.page(
                new Query<ProductNameEntity>().getPage(params),
                new QueryWrapper<ProductNameEntity>().orderByDesc("create_time")
        );

        return new PageUtils(page);
    }

}
